package gam.t1.appraisal2.dinv;

import gam.t1.appraisal2.DIConfig;
import gam.t1.appraisal2.Data;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.Plugin;

import java.io.File;

public class AppraisalOption extends DIConfig {
    public static ItemStack EMPTY;
    public static ItemStack HASNext ;
    public static ItemStack NO ;
    public static ItemStack HASPre;
    public static ItemStack Correct;
    public static ItemStack Cancel;
    public AppraisalOption(Plugin plugin, String filePath) {
        super(plugin, filePath);
    }
    @Override
    protected void load() {
        File var1 = new File(plugin.getDataFolder(),filePath);
        if (!var1.exists()){
            var1.getParentFile().mkdirs();
            plugin.saveResource(filePath, false);
        }
        YamlConfiguration var2 = YamlConfiguration.loadConfiguration(var1);
        HASNext = Data.NI_ITEMMANAGER.getItemStack(var2.getString("pageitems.hasnext"));
        HASPre = Data.NI_ITEMMANAGER.getItemStack(var2.getString("pageitems.haspre"));
        NO = Data.NI_ITEMMANAGER.getItemStack(var2.getString("pageitems.nos"));
        EMPTY = Data.NI_ITEMMANAGER.getItemStack(var2.getString("emptyitem"));
        Correct = Data.NI_ITEMMANAGER.getItemStack(var2.getString("correct"));
        Cancel = Data.NI_ITEMMANAGER.getItemStack(var2.getString("cancel"));
    }
}
